<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    //10 进制
    let num = 20;
    //16 进制
    let num2 = 0xff;
    //2 进制
    let num3 = 0b10101;// 2^4*1 + 2^2*1 + 2^0 *1
    //8 进制
    let num4 = 0o775;// 8^2*7 + 8^1*7 + 8^0*5

    //Number.isFinite(Infinity)  是否有有限数
    // console.log(Number.isFinite(10));
    // console.log(Number.isFinite(Infinity));
    // console.log(Number.isFinite(Math.PI));

    //NaN
    // console.log(Number.isNaN(NaN));
    
    //判断是否为整数
    // console.log(Number.isInteger(12.3));
    // console.log(Number.isInteger(521));
    // console.log(Number.isInteger(521.0));

    //移除小数位
    // console.log(Math.trunc(3.9568));

    //幂运算
    // console.log(Math.pow(5, 3));
    // console.log(5 ** 4);

    //获取数值的正负
    // console.log(Math.sign(2)) // 1
    // console.log(Math.sign(-2)) // 1
  </script>
</body>
</html>